Library discovery for rpath patching needs to be deterministic
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
Given a snap with four different versions of libfoo, located in usr/lib/libfoo.so, usr/lib/x86_64-linux-gnu/libfoo.so, lib/libfoo.so, and lib/randomdir/libfoo.so, Snapcraft will find an executable that wants to link to libfoo.so and may determine any one of these are a match in a directory walk that isn't deterministic and certainly doesn't behave like ld.
We need to walk the entire snap looking for libraries so that we find them in odd places, but we need to first look in common directories, in the order that ld would find them, and maintain that consistency.
Evaluation history
No evaluation history available.